<?php
ini_set('memory_limit', '1024M');
$sub_url = str_replace(array('/', DIRECTORY_SEPARATOR), array('', ''), dirname($_SERVER['PHP_SELF']));
$url = 'http://' . $_SERVER['HTTP_HOST'] . $sub_url . '/pic?' . $_SERVER['QUERY_STRING'];
header("location: $url");
exit;